'use client'

import { useEffect, useState } from 'react'
import ReactMarkdown from 'react-markdown'

export default function ApiDocs() {
  const [markdown, setMarkdown] = useState('')

  useEffect(() => {
    fetch('/API.md')
      .then(res => res.text())
      .then(text => setMarkdown(text))
  }, [])

  return (
    <div className="container mx-auto px-4 py-8 prose prose-slate max-w-none">
      <ReactMarkdown>{markdown}</ReactMarkdown>
    </div>
  )
} 